package com.spring.framework.webmvc.servlet;

import java.lang.reflect.Method;
import java.util.regex.Pattern;

/**
 * @author ππ
 * @date 2020-11-17 13:19
 * @desc 声明HandlerMapping，URL映射关系
 */

public class MyHandlerMapping {
    /**URL匹配表达式*/
    private Pattern pattern;
    /**对应的方法*/
    private Method method;
    /**对应的controller*/
    private Object controller;

    public MyHandlerMapping(Pattern pattern, Method method, Object controller) {
        this.pattern = pattern;
        this.method = method;
        this.controller = controller;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public Method getMethod() {
        return method;
    }

    public Object getController() {
        return controller;
    }
}
